package com.shopping.util;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

/**
 * 切面测试, 无意义
 * 可删除
 */
@Aspect
public class MyAspect {

    @Pointcut("execution(* com.shopping.service.trade.TradeServiceImpl.*(..))")
    public void pointCut(){}

    @Before("execution(* com.shopping.service.trade.TradeServiceImpl.addTrade(..))")
    public void before(){
        System.out.println("before addTrade...");
    }

    @After("pointCut()")
    public void after(){
        System.out.println("after *()...");
    }

}
